// 封装起来 等到复用的时候简化代码 是代码更加简单高效
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 获取的token
  token: state => state.user.token,
  // 用户名头像
  avatar: state => state.user.userInfo.staffPhoto,
  // 用户名名称
  name: state => state.user.userInfo.username,
  // 获取用户的id
  userId: state => state.user.userInfo.userId,
  // 引入路由信息
  routes: state => state.user.routes,
  // 公司名称
  company: state => state.user.userInfo.company,
  // 部门名称
  departmentName: state => state.user.userInfo.departmentName
}
export default getters
